<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>文件管理器</title>
		<link rel="stylesheet" type="text/css" href="../css/style1.css" />
		<link rel="stylesheet" type="text/css" href="../css/base.css" />
		<link rel="stylesheet" type="text/css" href="../css/indexbody.css" />
		<script type="text/javascript" src="../js/frame.js"></script>
		<script type="text/javascript" src="../js/jquery.js"></script>
		<script type="text/javascript" src="../js/jquery-1.8.0.min.js"></script>
		
		<script type="text/javascript">
	window.onload = function() {
		document.getElementById("hide").style.display = "none";
		document.getElementById("sc").style.display = "none";
		document.getElementById("vip").style.display = 'none';
		document.getElementById("mb").style.display = 'none';
		document.getElementById("sys").style.display = 'block';
	}

		function delFile(fileName){
			//删除文件，传入文件名字，和当前路径即可 
			
			var path ='<%=path%>/manager/media/fileManager_delFile.action?currentPath=${relativeParent}/${currentPath}&fileName='+ fileName;
			location.href=path ;
		}
		

</script>
		<style>
.linerow {
	border-bottom: 1px solid #CBD8AC;
	height: 24px
}
</style>


	</head>
	<body background='../images/allbg.gif' leftmargin='8' topmargin='8'>
		<div id="container">
			<jsp:include page="../header.jsp"></jsp:include>
			<div style="float: left; width: 195px; height: 550px">
				<jsp:include page="../leftnav.jsp"></jsp:include>
			</div>
			<div
			
				style="float: left; overflow-y: scroll; overflow-x: hidden; width: 785px; height: 550px;">

				<table width='98%' border='0' cellspacing='1' cellpadding='2'
					align='center' style="background: #cfcfcf;">
					<tr bgcolor="#cfcfcf" height="28" align="center">
						<td width="28%" background="../images/wbg.gif">
							<strong>文件名</strong>
						</td>
						<td width="16%" background="../images/newlinebg3.gif">
							<strong>文件大小</strong>
						</td>
						<td width="22%" background="../images/wbg.gif">
							<strong>最后修改时间</strong>
						</td>
						<td width="34%" background="../images/newlinebg3.gif">
							<strong>操作</strong>
						</td>
					</tr>
					<tr>
						<td bgcolor='#ffffff' height='25'>
							<a href="fileManager_getFileList.action?fileName=/${relativeParent}"><img src="../images/dir2.gif" border=0 width=16
									height=16 align=absmiddle />上级目录 </a>
						</td>
						<td colspan='3' bgcolor='#ffffff'>
							当前目录:${currentPath}
						</td>
					</tr>
		
					<c:forEach var="dir" items="${folder}"> <!-- 这里是遍历文件夹 -->
						
						
						
					<tr bgcolor="#FFFFFF">
						<td>
							<a href="fileManager_getFileList.action?fileName=${fileName}/${dir.key}" ><img src="../images/dir.gif" border=0 width=16 height=16 align=absmiddle /> ${dir.key} </a>
									
						</td>
						<td>
						</td>
						<td align='center'>
						${dir.value['lastModified']}
						</td>
						<td>
							<a
								href='<%=path%>/manager/media/fileManager_renameJump.action?currentPath=${relativeParent}/${currentPath}&fileName=${dir.key}'>[改名]</a> &nbsp;
							<a href="<%=path%>/manager/media/fileManager_delFile.action?currentPath=${relativeParent}/${currentPath}&fileName=${dir.key}" >[删除]</a>
						</td>
					</tr>
							
					</c:forEach>
					
					
					
				
					<c:forEach var="file" items="${files}"> <!-- 这里是遍历文件 -->
					
					<tr bgcolor="#FFFFFF">
						<td>
							<a href="" target="_blank"><img
									src=../images/css.gif border=0 width=16 height=16
									align=absmiddle>
									${file.key}
							</a>
						</td>
						<td align='center'>
							${file.value['length']}
						</td>
						<td align='center'>
								${file.value['lastModified']}
						</td>
						<td>
							<a href='<%=path%>/manager/media/fileManager_updateJump.action?currentPath=${relativeParent}/${currentPath}&fileName=${file.key}'>[编辑]</a> &nbsp;
							<a
								href='<%=path%>/manager/media/fileManager_renameJump.action?fileName=${file.key}&currentPath=/${relativeParent}/${currentPath}'>[改名]</a>
							&nbsp;
							<a href="<%=path%>/manager/media/fileManager_delFile.action?currentPath=${relativeParent}/${currentPath}&fileName=${file.key}"  >[删除]</a>
							&nbsp;
							<a
								href='<%=path%>/manager/media/fileManager_moveJump.action?currentPath=${relativeParent}/${currentPath}&fileName=${file.key}'>[移动]</a>
								&nbsp;
								<a
								href='<%=path%>/manager/media/fileManager_backFile.action?currentPath=${relativeParent}/${currentPath}&fileName=${file.key}'>[备份]</a>
								
								
								
						</td>
					</tr>
					
					</c:forEach>
				
					
					
					<tr>
						<td colspan="4" height='26' bgcolor='#F9FCEF'>

							<a href='<%=path%>/manager/media/fileManager_getFileList.action'>[根目录]</a> &nbsp;
							<a href="<%=path%>/manager/media/fileManager_addDolderJump.action?currentPath=${relativeParent}/${currentPath}">[新建文件]</a> &nbsp;
							<a href="<%=path%>/manager/media/fileManager_addCatalog.action?currentPath=${relativeParent}/${currentPath}">[新建目录]</a> &nbsp;
							<a href="<%=path%>/manager/media/file_add.jsp">[文件上传]</a> &nbsp;

						</td>
					</tr>
				</table>

			</div>
		</div>
	</body>
</html>
